PRODUCT_NAME=Globe
IPHONE_IP=192.168.0.113
CC=arm-apple-darwin-gcc
CXX=arm-apple-darwin-gcc
CFLAGS=-g -O2 -Wall
CPPFLAGS=-fno-exceptions -fno-rtti
LD=$(CC)
LDFLAGS = -lobjc \
        -ObjC \
        -framework CoreFoundation \
        -framework Foundation \
        -framework CoreGraphics \
        -framework UIKit \
        -framework LayerKit \
        -framework OpenGLES \
        -I/usr/local/arm-apple-darwin/include

LDFLAGS=-lobjc \
        -framework CoreFoundation \
        -framework Foundation \
        -framework UIKit \
        -framework LayerKit \
        -framework OpenGLES \
        -framework GraphicsServices \
        -I/usr/local/arm-apple-darwin/include

all:  Globe.app/Globe	

Globe.app/Globe: main.m uiglobe.m globe.c arcball.c
	$(LD) $(LDFLAGS) -o $@ $^

%.o:	%.m
		$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

clean:
	rm -f *.o Globe.app/Globe

run: Globe.app/Globe
	scp -r Globe.app root@$(IPHONE_IP):/Applications
	ssh -t root@$(IPHONE_IP) /Applications/Globe.app/Globe

